#include <iostream>
#include <vector>

using namespace std;

int main(){
    int a[] = {0, 1, 2}; int b[] = {0 ,1, 2, 3, 4};
    vector<int> vec_a(a, a+3); vector<int> vec_b(b, b+5); 
    int num = 0;
    if(vec_a.size() <= vec_b.size()){
        int small_size = vec_a.size();
        for(int i = 0; i < small_size; ++i){
            if(vec_a[i] == vec_b[i]){
                ++num;
            }
        }
        cout <<((num == small_size) ? "vec_a是vec_b的前缀" : "vec_a不是vec_b的前缀") << endl;
    }else{
        int small_size = vec_b.size();
        for(int i = 0; i < small_size; ++i){
            if(vec_b[i] == vec_a[i]){
                ++num;
            }
        }
        cout << ((num == small_size) ? "vec_b是vec_a的前缀" : "vec_b不是vec_a的前缀") <<endl;

    }
    return 0;
}